﻿<?xml version='1.0'?>
<!DOCTYPE xs:schema SYSTEM "../namespace/XMLSchema.dtd" [

    <!--
     keep this schema XML1.0 DTD valid
  -->
    <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>

    <!ELEMENT hfp:hasFacet EMPTY>
    <!ATTLIST hfp:hasFacet
                name NMTOKEN #REQUIRED>

    <!ELEMENT hfp:hasProperty EMPTY>
    <!ATTLIST hfp:hasProperty
                name NMTOKEN #REQUIRED
                value CDATA #REQUIRED>

]>
<xs:schema
  xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified"
  xml:lang="en"
  targetNamespace="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
        <xs:documentation>
            This document contains XML representations for the
            ordinary non-primitive built-in datatypes
        </xs:documentation>
    </xs:annotation>
    <xs:simpleType name="normalizedString" id="normalizedString">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#normalizedString"/>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="token" id="token">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#token"/>
        </xs:annotation>
        <xs:restriction base="xs:normalizedString">
            <xs:whiteSpace value="collapse" id="token.whiteSpace"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="language" id="language">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#language"/>
        </xs:annotation>
        <xs:restriction base="xs:token">
            <xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern">
                <xs:annotation>
                    <xs:documentation source="http://www.ietf.org/rfc/bcp/bcp47.txt">
                        pattern specifies the content of section 2.12 of XML 1.0e2
                        and RFC 3066 (Revised version of RFC 1766).  N.B. RFC 3066 is now
                        obsolete; the grammar of RFC4646 is more restrictive.  So strict
                        conformance to the rules for language codes requires extra checking
                        beyond validation against this type.
                    </xs:documentation>
                </xs:annotation>
            </xs:pattern>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="IDREFS" id="IDREFS">
        <xs:annotation>
            <xs:appinfo>
                <hfp:hasFacet name="length"/>
                <hfp:hasFacet name="minLength"/>
                <hfp:hasFacet name="maxLength"/>
                <hfp:hasFacet name="enumeration"/>
                <hfp:hasFacet name="whiteSpace"/>
                <hfp:hasFacet name="pattern"/>
                <hfp:hasFacet name="assertions"/>
                <hfp:hasProperty name="ordered" value="false"/>
                <hfp:hasProperty name="bounded" value="false"/>
                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                <hfp:hasProperty name="numeric" value="false"/>
            </xs:appinfo>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#IDREFS"/>
        </xs:annotation>
        <xs:restriction>
            <xs:simpleType>
                <xs:list itemType="xs:IDREF"/>
            </xs:simpleType>
            <xs:minLength value="1" id="IDREFS.minLength"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="ENTITIES" id="ENTITIES">
        <xs:annotation>
            <xs:appinfo>
                <hfp:hasFacet name="length"/>
                <hfp:hasFacet name="minLength"/>
                <hfp:hasFacet name="maxLength"/>
                <hfp:hasFacet name="enumeration"/>
                <hfp:hasFacet name="whiteSpace"/>
                <hfp:hasFacet name="pattern"/>
                <hfp:hasFacet name="assertions"/>
                <hfp:hasProperty name="ordered" value="false"/>
                <hfp:hasProperty name="bounded" value="false"/>
                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                <hfp:hasProperty name="numeric" value="false"/>
            </xs:appinfo>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#ENTITIES"/>
        </xs:annotation>
        <xs:restriction>
            <xs:simpleType>
                <xs:list itemType="xs:ENTITY"/>
            </xs:simpleType>
            <xs:minLength value="1" id="ENTITIES.minLength"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="NMTOKEN" id="NMTOKEN">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#NMTOKEN"/>
        </xs:annotation>
        <xs:restriction base="xs:token">
            <xs:pattern value="\c+" id="NMTOKEN.pattern">
                <xs:annotation>
                    <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
                        pattern matches production 7 from the XML spec
                    </xs:documentation>
                </xs:annotation>
            </xs:pattern>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="NMTOKENS" id="NMTOKENS">
        <xs:annotation>
            <xs:appinfo>
                <hfp:hasFacet name="length"/>
                <hfp:hasFacet name="minLength"/>
                <hfp:hasFacet name="maxLength"/>
                <hfp:hasFacet name="enumeration"/>
                <hfp:hasFacet name="whiteSpace"/>
                <hfp:hasFacet name="pattern"/>
                <hfp:hasFacet name="assertions"/>
                <hfp:hasProperty name="ordered" value="false"/>
                <hfp:hasProperty name="bounded" value="false"/>
                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                <hfp:hasProperty name="numeric" value="false"/>
            </xs:appinfo>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#NMTOKENS"/>
        </xs:annotation>
        <xs:restriction>
            <xs:simpleType>
                <xs:list itemType="xs:NMTOKEN"/>
            </xs:simpleType>
            <xs:minLength value="1" id="NMTOKENS.minLength"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="Name" id="Name">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#Name"/>
        </xs:annotation>
        <xs:restriction base="xs:token">
            <xs:pattern value="\i\c*" id="Name.pattern">
                <xs:annotation>
                    <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Name">
                        pattern matches production 5 from the XML spec
                    </xs:documentation>
                </xs:annotation>
            </xs:pattern>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="NCName" id="NCName">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#NCName"/>
        </xs:annotation>
        <xs:restriction base="xs:Name">
            <xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">
                <xs:annotation>
                    <xs:documentation source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">
                        pattern matches production 4 from the Namespaces in XML spec
                    </xs:documentation>
                </xs:annotation>
            </xs:pattern>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="ID" id="ID">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#ID"/>
        </xs:annotation>
        <xs:restriction base="xs:NCName"/>
    </xs:simpleType>
    <xs:simpleType name="IDREF" id="IDREF">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#IDREF"/>
        </xs:annotation>
        <xs:restriction base="xs:NCName"/>
    </xs:simpleType>
    <xs:simpleType name="ENTITY" id="ENTITY">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#ENTITY"/>
        </xs:annotation>
        <xs:restriction base="xs:NCName"/>
    </xs:simpleType>
    <xs:simpleType name="integer" id="integer">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#integer"/>
        </xs:annotation>
        <xs:restriction base="xs:decimal">
            <xs:fractionDigits fixed="true" value="0" id="integer.fractionDigits"/>
            <xs:pattern value="[\-+]?[0-9]+" id="integer.pattern"/>

        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#nonPositiveInteger"/>
        </xs:annotation>
        <xs:restriction base="xs:integer">
            <xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="negativeInteger" id="negativeInteger">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#negativeInteger"/>
        </xs:annotation>
        <xs:restriction base="xs:nonPositiveInteger">
            <xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="long" id="long">
        <xs:annotation>
            <xs:appinfo>
                <hfp:hasProperty name="bounded" value="true"/>
                <hfp:hasProperty name="cardinality" value="finite"/>
            </xs:appinfo>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#long"/>
        </xs:annotation>
        <xs:restriction base="xs:integer">
            <xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/>
            <xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="int" id="int">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#int"/>
        </xs:annotation>
        <xs:restriction base="xs:long">
            <xs:minInclusive value="-2147483648" id="int.minInclusive"/>
            <xs:maxInclusive value="2147483647" id="int.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="short" id="short">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#short"/>
        </xs:annotation>
        <xs:restriction base="xs:int">
            <xs:minInclusive value="-32768" id="short.minInclusive"/>
            <xs:maxInclusive value="32767" id="short.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="byte" id="byte">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#byte"/>
        </xs:annotation>
        <xs:restriction base="xs:short">
            <xs:minInclusive value="-128" id="byte.minInclusive"/>
            <xs:maxInclusive value="127" id="byte.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#nonNegativeInteger"/>
        </xs:annotation>
        <xs:restriction base="xs:integer">
            <xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="unsignedLong" id="unsignedLong">
        <xs:annotation>
            <xs:appinfo>
                <hfp:hasProperty name="bounded" value="true"/>
                <hfp:hasProperty name="cardinality" value="finite"/>
            </xs:appinfo>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#unsignedLong"/>
        </xs:annotation>
        <xs:restriction base="xs:nonNegativeInteger">
            <xs:maxInclusive value="18446744073709551615" id="unsignedLong.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="unsignedInt" id="unsignedInt">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#unsignedInt"/>
        </xs:annotation>
        <xs:restriction base="xs:unsignedLong">
            <xs:maxInclusive value="4294967295" id="unsignedInt.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="unsignedShort" id="unsignedShort">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#unsignedShort"/>
        </xs:annotation>
        <xs:restriction base="xs:unsignedInt">
            <xs:maxInclusive value="65535" id="unsignedShort.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="unsignedByte" id="unsignedByte">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#unsignedByte"/>
        </xs:annotation>
        <xs:restriction base="xs:unsignedShort">
            <xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="positiveInteger" id="positiveInteger">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#positiveInteger"/>
        </xs:annotation>
        <xs:restriction base="xs:nonNegativeInteger">
            <xs:minInclusive value="1" id="positiveInteger.minInclusive"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="yearMonthDuration">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#yearMonthDuration">
                This type includes just those durations expressed in years and months.
                Since the pattern given excludes days, hours, minutes, and seconds,
                the values of this type have a seconds property of zero.  They are
                totally ordered.
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:duration">
            <xs:pattern id="yearMonthDuration.pattern" value="[^DT]*"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="dayTimeDuration">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#dayTimeDuration">
                This type includes just those durations expressed in days, hours, minutes, and seconds.
                The pattern given excludes years and months, so the values of this type
                have a months property of zero.  They are totally ordered.
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:duration">
            <xs:pattern id="dayTimeDuration.pattern" value="[^YM]*(T.*)?"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="dateTimeStamp" id="dateTimeStamp">
        <xs:annotation>
            <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#dateTimeStamp">
                This datatype includes just those dateTime values Whose explicitTimezone
                is present.  They are totally ordered.
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:dateTime">
            <xs:explicitTimezone fixed="true"
              id="dateTimeStamp.explicitTimezone" value="required"/>
        </xs:restriction>
    </xs:simpleType>

</xs:schema>